Aiming at the problem of 3D trajectory estimation for mobile service robots in unknown environments, this thesis proposed a novel framework for using Kinect sensor to estimate the motion trajectory of mobile robots in real time. RGB-D information of successive frames in the environment was captured by a Kinect: firstly, the feature points of Speeded Up Robust Feature (SURF) of the target frame and reference frame were extracted and matched; secondly, initial 6 Degree Of Freedom (DOF) pose estimation was computed by a novel solution for the classical Perspective-3-Point (P3P) problem and an improved Random Sample Consensus (RANSAC) algorithm combining with depth information; lastly, the pose estimation was refined by minimizing the reprojection error of inliers of initial value via a nonlinear least-squares solver, and then the motion trajectory of the robot was gained. The experimental results show that the error of the odometry is reduced to 3.1% by the proposed approach in real time. It can provide important prior information for simultaneous localization and mapping of robots.